Skip to content

fix(night-duty): simplify the iCal token lookup (SonarCloud S3267) - #81

Merged
kimipsen merged 1 commit into
masterfrom
night-feed-sonar-s3267
Nov 10, 2026
Merged

kimipsen merged 1 commit into
masterfrom
night-feed-sonar-s3267

Conversation

@kimipsen

Copy link
Copy Markdown
Owner

Summary

Follow-up to #77: the SonarCloud fix that wasn't in it when it was merged.

  • NightFeed.FindMatchingToken uses FirstOrDefault instead of a foreach loop (SonarCloud S3267). Each candidate is still compared with CryptographicOperations.FixedTimeEquals, so the behaviour is the same.

The other SonarCloud findings from #77 are known false positives (see .claude/skills/claude-backend/references/sonar-known-issues.md) and should be marked in SonarCloud rather than changed in code:

  • S3903 ×3, S1186, S3060 on the NightFeedEvent union: Sonar can't parse the preview union syntax.
  • S8970 in NightIcalFeedWriter: nullable is enabled project-wide, but automatic analysis doesn't see it.
  • S107 on GetNightIcalFeedHandler.Handle: the handler takes its injected dependencies as parameters.

Testing

  • dotnet test src/backend/backend.slnx --filter "FullyQualifiedName~NightIcal|FullyQualifiedName~NightFeed": 23 passed.

Refs #67

🤖 Generated with Claude Code

…kip-docs]

NightFeed.FindMatchingToken now uses FirstOrDefault instead of a
foreach loop; the per-candidate FixedTimeEquals comparison is unchanged.

The remaining SonarCloud findings on PR #77 (S3903, S1186, S3060 on the
union declaration, S8970, S107 on the feed handler) are known false
positives (sonar-known-issues.md) and are left for marking in SonarCloud.

Refs #67

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a177d89-6afa-4a6d-b5d0-3277119b444c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Backend coverage

Lines Branches
93.8% (24225/25837) 77.2% (6437/8338)

Full report: the coverage artifact of this run.

@kimipsen
kimipsen merged commit 248424f into master Nov 10, 2026
15 checks passed
@kimipsen
kimipsen deleted the night-feed-sonar-s3267 branch November 10, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant